import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:imperius_insights/treaty/dimensions.dart';
import 'package:imperius_insights/treaty/palette.dart';
import 'package:imperius_insights/treaty/strings.dart';
import 'package:imperius_insights/treaty/styles.dart';

class TiledCard extends StatelessWidget {

  final Widget child;

  TiledCard({ this.child });

  @override
  Widget build(BuildContext context) {
    return Material(
        elevation: 6,
        borderRadius: BorderRadius.circular(4),
        color: Colors.white,
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: <Widget>[
            Column(
              crossAxisAlignment: CrossAxisAlignment.start,
              children: <Widget>[
                Container(
                    decoration: BoxDecoration(color: palette.theme),
                    padding: EdgeInsets.symmetric(
                        horizontal: layoutDimensions.cardPaddingHorizontal,
                        vertical: 8),
                    child: Row(
                      children: <Widget>[
                        Expanded(
                          child: Text(Strings.quality_pmo_stats_qa_title,
                              style: styles.contentContrast),
                        )
                      ],
                    )),
              ],
            ),
            Divider(thickness: 0.5, height: 0, color: palette.divider),
            child
          ],
        ));
  }
}